Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make Endpoint::close infallible #3112

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

matheus23
Copy link
Contributor

Description

The only source for a Result::Err in Endpoint::close was a failed magic sock actor Shutdown message send.

This send should basically shutdown the actor, and sending only fails when the actor dropped the receiver, which only happens when the actor already shut down, gracefully or otherwise. In any case, it can't react to that anyways and it's not worth surfacing that error to the user.

Breaking Changes

  • iroh::Endpoint::close's future is now infallible, instead of returning a Result.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • [ ] Tests if relevant.
  • All breaking changes documented.

@matheus23 matheus23 added this to the v0.31.0 milestone Jan 9, 2025
@matheus23 matheus23 self-assigned this Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3112/docs/iroh/

Last updated: 2025-01-10T08:22:00Z

Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it

Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More of this!

@matheus23 matheus23 enabled auto-merge January 9, 2025 16:08
Copy link

github-actions bot commented Jan 9, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: a50819e

@matheus23 matheus23 added this pull request to the merge queue Jan 10, 2025
Merged via the queue into main with commit 870c76e Jan 10, 2025
26 checks passed
@matheus23 matheus23 deleted the matheus23/endpoint-close-infallible branch January 10, 2025 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants